package whu.cn.whushare.ui.main.known.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import whu.cn.whushare.bean.User;

public class AnswerWrapBean implements Parcelable {
	@Expose
	@SerializedName("user")
	public User user;
	@Expose
	@SerializedName("answer")
	public Answer answer;

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeParcelable(user, flags);
		dest.writeParcelable(answer, flags);
	}

	public static final Parcelable.Creator<AnswerWrapBean> CREATOR = new Creator<AnswerWrapBean>() {
		@Override
		public AnswerWrapBean createFromParcel(Parcel source) {
			AnswerWrapBean answerWrapBean = new AnswerWrapBean();
			answerWrapBean.user = source.readParcelable(User.class.getClassLoader());
			answerWrapBean.answer = source.readParcelable(Answer.class.getClassLoader());
			return answerWrapBean;
		}

		@Override
		public AnswerWrapBean[] newArray(int size) {
			return new AnswerWrapBean[0];
		}
	};
}
